<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Number()方法使用</title>
</head>
<body>
<script>
    console.log(Number(10));  // 10
    console.log(Number('22'));  // 22
    console.log(Number(false));  // 0
    console.log(Number(undefined));  // NaN
    console.log(Number(null));  // 0
    console.log(Number('Hello'));  // NaN
    console.log(Number(''));  // 0
    console.log(Number({}));  // NaN
</script>
</body>
</html>